package com.orderserver.controller;

import com.orderserver.pojo.Sale;
import com.orderserver.service.SaleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author wjn.
 * @Date 2020/11/13 - 16:50.
 */
@Controller
public class SaleController {
    @Resource
    private SaleService saleService;
    @RequestMapping("getAllSale")
    @ResponseBody
    public Object getAllSales(){
        List<Sale> saleList = saleService.getAllSale();
        return saleList;
    }
    @RequestMapping("getABC")
    @ResponseBody
    public String getAllABC(){
        System.out.println("8001");
        return "Rule"+8001;
    }

    @RequestMapping("getAllBug")
    @ResponseBody
    public String getAllBUg(){
        return "我依然很帅气的哦！";
    }
}
